#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 27 10:09:44 2018

@author: chenliheng
"""

# 编写程序提示用户输入月和年，然后显示这个月的天数

year = input("请输入年份:")
month = input("请输入月份:")

year = int(year)
month = int(month)
leapYear = False  # 默认不是闰年
if (year%4 == 0 and year%100 != 0) or (year%400==0): 
    leapYear = True
  
result = tuple([1,3,5,7,8,10,12]) # python中元祖：只读的列表；简易对象
    
if month in result:
    print("{}年{}月31天".format(year,month))
elif month in (4,6,9,11):
    print("{}年{}月30天".format(year,month))
else:
    if leapYear:
        print("{}年{}月29天".format(year,month))
    else:
        print("{}年{}月28天".format(year,month))

